Skip to content

Bundle per-job correlation into BatchFinished via BatchJobResult#24253

Draft
HadhemiDD wants to merge 2 commits into
masterfrom
hs/pre-job-correlation
Draft

Bundle per-job correlation into BatchFinished via BatchJobResult#24253
HadhemiDD wants to merge 2 commits into
masterfrom
hs/pre-job-correlation

Conversation

@HadhemiDD

Copy link
Copy Markdown
Contributor

Move the job spec / workflow-run / artifact-directory correlation out of the gatherer and into the TaskTestRunner producer, shipping it as a single enriched per-job BatchJobResult on BatchFinished.

  • BatchJob.artifact_name(): deterministic, collision-free, sanitized artifact name derived solely from the job's frozen fields. Replaces the gatherer's delimiter-bounded token match as the way a job's artifact directory is resolved.
  • BatchJobResult bundles the BatchJob spec, the matched WorkflowJob (or None), and the resolved artifact path (or None).
  • BatchFinished now carries batch_jobs; the runner joins each job to its workflow job by name and resolves its artifact directory by artifact name, tolerating missing API matches and missing artifacts.

What does this PR do?

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Move the job spec / workflow-run / artifact-directory correlation out of the
gatherer and into the TaskTestRunner producer, shipping it as a single enriched
per-job BatchJobResult on BatchFinished.

- BatchJob.artifact_name(): deterministic, collision-free, sanitized artifact
  name derived solely from the job's frozen fields. Replaces the gatherer's
  delimiter-bounded token match as the way a job's artifact directory is resolved.
- BatchJobResult bundles the BatchJob spec, the matched WorkflowJob (or None),
  and the resolved artifact path (or None).
- BatchFinished now carries batch_jobs; the runner joins each job to its
  workflow job by name and resolves its artifact directory by artifact name,
  tolerating missing API matches and missing artifacts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dd-octo-sts dd-octo-sts Bot added the ddev label Jun 30, 2026
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests  Code Coverage

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

Check PR | run / Check PR changelog   View in Datadog   GitHub Actions

PR All | test / j3a8e004 (py3.13-linux-odbc-2025-single) / SQL Server on Linux-py3.13-linux-odbc-2025-single   View in Datadog   GitHub Actions

Validate repository | Run Validations / Validate   View in Datadog   GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 94.94%
Overall Coverage: 88.13%

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 593ab2b | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Validation Report

Validation Description Status
qa-label Validate the pull request declares whether it needs QA for the next Agent release

Run ddev validate all changed --fix to attempt to auto-fix supported validations.

Passed validations (20)
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant